home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _GUICtrlComboDeleteString.au3 < prev    next >
Text File  |  2007-09-08  |  713b  |  28 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt('MustDeclareVars',1)
  5.  
  6. Dim $Combo, $Btn_Delete, $Btn_Exit, $msg
  7.  
  8. GuiCreate("ComboBox Delete String", 392, 254)
  9.  
  10. $Combo = GuiCtrlCreateCombo("A", 70, 10, 270, 110,$CBS_SIMPLE)
  11. $Btn_Delete = GuiCtrlCreateButton("Delete String", 135, 120, 90, 30)
  12. GUICtrlSetData($Combo,"B|C|D|E|F")
  13. $Btn_Exit = GuiCtrlCreateButton("Exit", 150, 180, 90, 30)
  14.  
  15. GuiSetState()
  16. While 1
  17.     $msg = GuiGetMsg()
  18.     Select
  19.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  20.             ExitLoop
  21.         Case $msg = $Btn_Delete
  22.             If(_GUICtrlComboGetCurSel($Combo) <> $CB_ERR) Then
  23.                 _GUICtrlComboDeleteString($Combo,_GUICtrlComboGetCurSel($Combo))
  24.             EndIf
  25.     EndSelect
  26. WEnd
  27. Exit
  28.